The invention relates generally to methods and systems for printing computer generated images and more particularly to a methods and apparatus for processing page description language (PDL) instructions for a page in support of a printing process.
A computer system can output data to a wide variety of output display devices. Output display devices such as laser printers, plotters, image setters and other printing devices produce an image or xe2x80x9cvisual representationxe2x80x9d on a piece of paper, a printing plate or the like. A printing device can print dots on a piece of paper corresponding to the information of a bit map or pixel map (where a pixel map is characterized as having a depth of two or more bits per pixel). As the use of desktop publishing increases, techniques for preparing and reproducing pages on a variety of output devices have been developed.
A page may include various types of objects, such as text, line art, and images, and its appearance is generally described by page description language instructions that are interpreted by an output device to create physical output having the desired appearance.
A color page additionally includes color data used in coloring the page. Colors are defined in accordance with a xe2x80x9ccolor space,xe2x80x9d which provides a data representation for a range of colors (a xe2x80x9ccolor gamutxe2x80x9d) in terms of basic color components. The specific color components depend on the color system used. For example, in the CMYK color system, colors are represented as combinations of cyan (C), magenta (M), yellow (Y), and key) (K) (generally black); in the RGB color system, colors are represented as combinations of red (R), green (G), and blue (B).
A color in the page is generally represented by a series of bits, with specific bits indicating the amount of each basic color component (colorant) used in the color. For example, a 24-bit RGB data representation may allocate bits 0-7 to indicate the amount of red, bits 8-15 to indicate the amount of green, and bits 16-23 to indicate the amount of blue.
These data representations of colors are used to create color separations, which in turn may be used by color output devices to produce the color page. Generally, each color separation corresponds to a color component of a color system used by the output device. For example, an image setter using a CMYK color system creates color separations for cyan, magenta, yellow, and black, with each separation indicating regions where the corresponding ink should be applied, as well as the amount of ink that should be applied.
Misalignment of separations can cause unintentional gaps or overlaps at edges of color regions in the output page. For example, at an edge separating two regions of different colors, misalignment may result in an output page having a gap between the two regions. At an edge separating a color region from a paper (no color) region, if the color is created from multiple separations, misalignment of those separations may result in an output page having one separation ink extending beyond the other separation ink for that color region.
To minimize the effects of misalignment, a trapping technique may be implemented. Trapping adjusts the shapes of color regions at edges by spreading (expanding) some separation color regions to prevent gaps, and choking (contracting) other separation color regions to prevent overlaps. The adjusted areas into which inks will be spread or from which inks will be contracted are referred to as xe2x80x9ctrapsxe2x80x9d. Trapping also determines the amount of ink to be applied to the traps for each affected separation.
While trapping techniques improve the overall output image quality, the improvement is not without costs. Some trapping techniques operate on page description instructions to produce traps. Each object in a page description language file associated with an output image is processed by a xe2x80x9ctrapping enginexe2x80x9d and all necessary traps are determined prior to printing. The trapping engine consumes resources (such as operating cycles) to process each object in the page description file. Accordingly, a longer delay in printing the page may result as the number of objects required to be processed by the trapping engine increases. Additional memory must be allocated to store the trap data for edges associated with each object. Again, as the number of objects processed increases so to do the storage requirements.
As described above a page may include various types of objects, such as text, line art, and images, and its appearance is generally described by page description language instructions that are interpreted by an output device to create physical output having the desired appearance. One type of object that may be a vignette. A vignette is a gradient defining a color or shading ramp to be applied to an object. Typically, page description instructions for defining a vignette include a plurality of individual objects each defining a band in the vignette. The objects are typically unrelated and must be processed individually by an interpreter within a printing device. Once interpreted, the sum total of the objects produce a shading or gradient effect which is applied to the page.
In general, in one aspect, a method of trapping objects for a page includes identifying sequential matching objects, combining into a larger object matching sequential objects including parameterizing each object as a band in the larger object and trapping non-matching objects and the larger object.
Aspects of the invention include numerous features. Identifying sequential matching objects includes determining if marking operators, colors and shapes for sequential objects match. Combining matching objects includes determining if shapes associated with the identified objects match. Each matching object is parameterized according to a set of parameters defining an outline of a given object. Trapping includes determining edges of other objects that intersect the larger object and for each intersecting edge splitting the edge into segments corresponding to band edges of the larger object to determine trap data. Combining matching objects includes storing the larger object as series of bands each band stored as a polygon and represented by a set of parameters including a distance, width, step and axis.
In another aspect, the invention provides a method of reducing the number and size of objects trapped for a page and includes identifying sequential objects that match and combining into a larger object the sequential matching objects prior to trapping including parameterizing each object as a band in the larger object.
In another aspect, the invention provides a method of trapping objects for a page by a trapping engine and includes receiving an object and comparing the object to a last object processed by the trapping engine. If the object and last object match, the object is added as a band to the last object creating a larger single object. Otherwise, the object is added to a trapping display list. Matching objects are added to the larger single object until a non-matching object is found and then the larger single object is added to the trapping display list.
In another aspect, the invention provides a method of preparing a page to be printed including receiving a page description language file describing the page to be printed, identifying sequential matching objects in the page description file that represent a gradient to be printed on the page and combining into a larger object matching sequential objects. The step of combining includes defining an outline for the object and a defining a function describing the coloring for the object.
Aspects of the invention include numerous features. The larger object can be stored as a smooth shading operator in the page description file.
In another aspect, the invention provides a method of trapping a page description file describing a page to be printed on an output device. Th method includes receiving a page description language file including a plurality of objects describing the page to be printed. Edges of the objects to be trapped are identified and stored in a list. Edges in the list that intersect a vignette object are identified. The edges that intersect the vignette object are split into edge segments corresponding to bands in the vignette object and added to the list. Finally the edges in the list are trapped.
In another aspect, the invention provides a method of trapping objects for a page including creating a vignette object from sequential matching objects and using the vignette object for trapping against other objects.
In another aspect, the invention provides a computer program, tangibly stored on a computer-readable medium, for trapping a page description file describing a page to be printed on an output device. The computer program includes instructions for causing a computer to create a vignette object from sequential matching objects and use the vignette object for trapping against other objects.
Advantages of the invention may include one or more of the following. A trap engine identifies vignettes defining a color or shading gradient ramp and stores the vignette as a single object. A vignette object can be used to represent a plurality of page description language objects for the purposes of trapping. The vignette can be compressed so that the color or shade at a point is represented by a function and not separate vignette slices. Each object making up a vignette can be stored as a polygon or can be parameterized to minimize storage requirements for the vignette. Colors for an object that intersect a vignette can be determined easily by splitting an intersecting edge of the object into segments that intersect no more than one band of the vignette object and thereafter determining a color associated with the intersection. Other advantages and features will become apparent from the description and from the claims.